package com.github.ompc.carrying.server.test;

import com.github.ompc.carrying.common.domain.Row;
import com.github.ompc.carrying.server.dao.RowDao;
import junit.framework.Assert;
import org.junit.Test;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * Created by vlinux on 14-9-2.
 */
public class RowDaoTestCase extends SpringTestCase {

    @Resource(name="rowDao")
    private RowDao rowDao;

    @Test
    public void test_carrying_1G_total_10577650() throws IOException {
        int counter = 0;

        while( true ) {

            final Row data = rowDao.getRow();
            if( null == data ) {
                break;
            }

            counter++;

        }

        Assert.assertEquals(counter,10577650L);
    }

}
